/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.uhk.ppro.response.model;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * @author Martin Zmítko <martin.zmitko@gmail.com>
 */


@Entity
@Table(name="STUDENTS")
public class Student extends Person implements Serializable {

    private String address;

    private String city;

    private String telephone;

    private int yearOfBirth;
    
    private String user;
    
    private String password;

    /**
     * Student má své kurzy
     */

    @ManyToMany(mappedBy="students", fetch=FetchType.LAZY)
    private List<Course> courses;

    public List<Course> getCourses() {
        return courses;
    }

    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }


        public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

        public int getYearOfBirth() {
		return this.yearOfBirth;
	}

        public void setYearOfBirth(int yearOfBirth) {
		this.yearOfBirth = yearOfBirth;
	}

        public String getUser() {
            return user;
        }

        public String getPassword() {
            return password;
        }

        public void setUser(String user) {
            this.user = user;
        }

        public void setPassowrd(String passowrd) {
            this.password = passowrd;
        }
        
        
        


}
